<template>
  <header class="navbar">
    <el-row>
      <el-col :span="4">
        <div class="logo">
          <h2>LOGO</h2>
        </div>
      </el-col>
      <el-col :span="4">
        <span></span>
      </el-col>
      <el-col :span="10">
        <div class="nav">
          <ul>
            <li v-for="(item,index) in navList"
                :key="index">{{item}}</li>
          </ul>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="user">
          <p><span>{{userName}}</span><i class="el-icon-arrow-down"></i></p>
        </div>
      </el-col>
    </el-row>
  </header>
</template>

<script>
export default {
  name: 'navbar',
  data () {
    return {
      navList: ["首页", "新闻资讯", "加入我们", "联系我们"],
      userName: "未登录"
    }
  }
}
</script>

<style scoped>
.navbar {
  width: 100%;
  height: 69px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.navbar .logo {
  line-height: 69px;
  text-align: center;
  font-size: 26px;
  cursor: pointer;
  color: #409eff;
}
.navbar .nav ul {
  display: flex;
  margin-left: 120px;
}
.navbar .nav ul li {
  width: 25%;
  line-height: 69px;
  font-size: 18px;
  margin: 0 10px;
  text-align: center;
  cursor: pointer;
}
.user {
  line-height: 69px;
  text-align: center;
  padding-left: 50px;
  margin-left: 50px;
}
.user p {
  cursor: pointer;
}

.navbar .logo:hover {
  transition: all 2s;
  transform: rotate(360deg);
}

.navbar .nav ul li:hover {
  transition: all 0.18s;
  border-bottom: 4px solid #409eff;
  transform: translateY(-5px);
}
</style>